package cn.ad.server.domain.enumration;

import java.util.HashMap;
import java.util.Map;

/**
 * @author dongbin.yu
 * @from 2016-06-29
 * @since V1.0
 */
public enum ElementType {

    VIDEO(0,"视频"),
    TEXT(1,"文本"),
    IMAGE(2,"图片");

    private int value;

    private String name;

    public final static Map<Integer, ElementType> elementTypeMap = new HashMap<>();

    static {
        for (ElementType elementType : values()) {
            elementTypeMap.put(elementType.getValue(), elementType);
        }
    }

    ElementType(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }
}
